package a66weding.com.jiehuntong.activity.toolsinvitation;

import android.content.Intent;
import android.os.Bundle;
import android.text.TextUtils;
import android.view.View;
import android.view.Window;
import android.widget.ImageView;
import android.widget.LinearLayout;
import android.widget.TextView;

import a66weding.com.jiehuntong.R;
import a66weding.com.jiehuntong.http.RequestCode;
import me.imid.swipebacklayout.lib.app.SwipeBackActivity;

public class ToolsInvitationcardActivity extends SwipeBackActivity implements View.OnClickListener {
    private TextView mTitleTv;
    private TextView mBackTv;
    private TextView mHeadRightfuncTv;
    private LinearLayout mBackLay;
    private LinearLayout mSelectPlaceLay;

    private ImageView mGroup1Iv;
    private ImageView mGroup2Iv;


    private String url;
    private String backTv;

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        supportRequestWindowFeature(Window.FEATURE_NO_TITLE);
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_tools_invitationcard);


        Intent intent = getIntent();
        if(intent!=null){
            backTv = intent.getStringExtra("backTv");
        }

        initview();

        initdata();
    }



    private void initview() {
        mTitleTv = (TextView) findViewById(R.id.tv_header_title);
        mBackTv = (TextView) findViewById(R.id.tv_header_backcontent);
        mBackLay = (LinearLayout) findViewById(R.id.llay_header_back);
        mSelectPlaceLay = (LinearLayout) findViewById(R.id.lay_header_place);
        mHeadRightfuncTv = (TextView) findViewById(R.id.tv_header_function);

        mGroup1Iv = (ImageView) findViewById(R.id.iv_eInv_group1);
        mGroup2Iv = (ImageView) findViewById(R.id.iv_eInv_group2);




        mTitleTv.setText("电子请柬");
        if(!TextUtils.isEmpty(backTv)) {
            mBackTv.setText(backTv);
        }

        mHeadRightfuncTv.setVisibility(View.GONE);

        mBackLay.setOnClickListener(this);
        mGroup1Iv.setOnClickListener(this);
        mGroup2Iv.setOnClickListener(this);

    }


    private void initdata() {


    }



    @Override
    public void onClick(View view) {
        switch (view.getId()) {
                case R.id.llay_header_back:
                    finish();
                break;
                case R.id.iv_eInv_group1:
                    Intent intent = new Intent(this, ToolsInvitationDetailActivity.class);
                    intent.putExtra("url", RequestCode.E_invatation_1);
                    startActivity(intent);
                    break;
                case R.id.iv_eInv_group2:
                    Intent intent2 = new Intent(this, ToolsInvitationDetailActivity.class);
                    intent2.putExtra("url", RequestCode.E_invatation_2);
                    startActivity(intent2);
                    break;
        }
    }



}
